
package com.joysuch.wwyt.risk.enums;

public enum RiskPointStates {
    INITIAL(3, "草稿状态"), NORMAL(0, "正常"), AUDIT_FAIL(2, "审核失败");

    private int code;
    private String name;

    private RiskPointStates(int code, String name) {
        this.code = code;
        this.name = name;
    }

    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public static boolean isNormal(Integer state) {
        return state != null && NORMAL.getCode() == state;
    }
}
